package com.hbnu.exercise.net;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class TcpClientDemo01
{
    public static void main(String[] args)
    {
        try
        {
            Socket socket = new Socket("127.0.0.1", 8888);

            OutputStream out = socket.getOutputStream();

            out.write("今天是2024年10月24日".getBytes());

            socket.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }
}
